package main

import (
	"fmt"

	"gitee.com/youkelike/ziam/zapp/app"
	"gitee.com/youkelike/zlog"
)

func main() {
	opts := NewOptions()

	app.NewApp("IAM API SERVER", "ziam-apiserver",
		app.WithOptions(opts),
		app.WithDescription("The IAM API server validates and configures data"),
		app.WithDefaultValidArgs(),
		app.WithRunFunc(run(opts)),
	).Run()
}

func run(opts *Options) app.RunFunc {
	return func(basename string) error {
		fmt.Println("running...")
		zlog.Warnw("%s is runing.", basename)
		return nil
	}
}
